#pragma strict
var buttonColorTo : Color32;
var buttonColorFrom : Color32;
var colorSpeed : float;
var CameraObject : Transform;
var cameraMoveSpeed : float;

function Start() {

	buttonColorTo = Color32(246,255,0,0);
	buttonColorFrom = Color32(150,150,150,0);	
	colorSpeed = 20;
	cameraMoveSpeed = 1.5;

	renderer.material.SetColor("_Color", buttonColorFrom);
	
}

function OnMouseEnter() {

	iTween.ColorTo(gameObject, buttonColorTo, colorSpeed * Time.deltaTime);

}

function OnMouseExit() {

	iTween.ColorTo(gameObject, buttonColorFrom, colorSpeed * Time.deltaTime);

}

function OnMouseDown() {
	iTween.MoveTo(CameraObject.gameObject,Vector3(-12.5,0,-5.5),cameraMoveSpeed);
	iTween.RotateTo(CameraObject.gameObject,Vector3(0,-90,0),cameraMoveSpeed);
	
	var MenuOptions = CameraObject.GetComponent(MainCamera);
	MenuOptions.inOptions = true;
}